Skip to content

KAFKA-17689: Remove unused TieredStorageTestHarness#22445

Merged
chia7712 merged 3 commits into
apache:trunkfrom
joshua2519:KAFKA-17689-remove-TieredStorageTestHarness
Jun 8, 2026
Merged

KAFKA-17689: Remove unused TieredStorageTestHarness#22445
chia7712 merged 3 commits into
apache:trunkfrom
joshua2519:KAFKA-17689-remove-TieredStorageTestHarness

Conversation

@joshua2519

@joshua2519 joshua2519 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Nothing extends TieredStorageTestHarness since the tiered-storage
integration tests moved to the @ClusterTemplate + ClusterInstance
pattern. This deletes it and its now-dead adapter
HarnessBackedClusterInstance, moves the two still-used static helpers
(remoteStorageManagers, localStorages) into
TieredStorageTestUtils, and refreshes the README. Test-only change.

Reviewers: Ken Huang s7133700@gmail.com, Russole Chen
850905junior@gmail.com, Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions Bot added triage PRs from the community tests Test fixes (including flaky tests) storage Pull requests that target the storage module labels Jun 2, 2026

@Russole Russole left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @joshua2519 for working on this. Mostly LGTM. Just left a few minor comments.

# The Test Flow

Step 1: For every test, setup is done via TieredStorageTestHarness which extends IntegrationTestHarness and sets up a cluster with TS enabled on it.
Step 1: Each test is a standalone class. It declares a `clusterConfig()` method that returns a `ClusterConfig` with tiered storage enabled (via `TieredStorageTestUtils.createServerPropsForRemoteStorage`), and test methods annotated with `@ClusterTemplate("clusterConfig")` that receive a `ClusterInstance` provided by the test framework.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The current wording says clusterConfig() returns a ClusterConfig, but the tiered storage tests generally return List<ClusterConfig> from their @ClusterTemplate methods. Could we make this slightly more precise, e.g. “returns one or more ClusterConfig instances, typically as List<ClusterConfig>”?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@github-actions github-actions Bot removed the triage PRs from the community label Jun 4, 2026

@m1a2st m1a2st left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @joshua2519 for this patch, two minor comments

private static final Integer RLM_TASK_INTERVAL_MS = 500;
private static final Integer RLMM_INIT_RETRY_INTERVAL_MS = 300;

public static List<LocalTieredStorage> remoteStorageManagers(Collection<KafkaBroker> brokers) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since only TieredStorageTestContext uses this method, we can move it there.

return storages;
}

public static List<BrokerLocalStorage> localStorages(Collection<KafkaBroker> brokers) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

return brokers.stream()
.map(b -> new BrokerLocalStorage(b.config().brokerId(), Set.copyOf(b.config().logDirs()),
STORAGE_WAIT_TIMEOUT_SEC))
.collect(Collectors.toList());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.toList

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

…t, use Stream.toList(), and fix README wording

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@m1a2st m1a2st left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

…-TieredStorageTestHarness

# Conflicts:
#	storage/src/test/java/org/apache/kafka/tiered/storage/HarnessBackedClusterInstance.java
@chia7712 chia7712 merged commit 99c7025 into apache:trunk Jun 8, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved storage Pull requests that target the storage module tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants